package simple;

import java.io.*;
import java.lang.*;
import simple.node.*;
import simple.analysis.*;
import simple.lexer.*;
import simple.parser.*;


public class main
{ 
    public static void main(String[] arguments)
    { 
        try {
            Lexer lexer = new Lexer(new PushbackReader(
                new BufferedReader(
                new FileReader(arguments[0])), 1024));

                                                                  
            Parser parser = new Parser(lexer);
            Node ast = parser.parse(); // construye el AST
            //ast.apply(new DepthFirstAdapter()); // Llama al interprete
            ast.apply(new Pretty()); // Llama al interprete
            //ast.apply(new Arbol()); // Llama al interprete
        } catch(Exception e) { 
            System.out.println(e); 
        }
    }
  }




